<script>
var saveMenuFn = function()
{
	$.ajax({
		url:'${request.contextPath}/menu/modifyMenu.htm',
		type:'post',
		dataType:'json',
		async:'false',
		cache:false,
		processData:true,
		data:$('#editForm').serialize(),
		success:function(data)
		{
			$('#editModal').modal('hide');
			alert(data.msg);
			if(data.success==1)
			{
				
				searchMeunData();
			}	
		}
	});
}
</script>
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
            	编辑菜单
            </h4>
         </div>
         <div class="modal-body">
           	<form id="editForm">
           		<input type="hidden" name="id" value="${modifyMenu.id}"/>
           		<table class="table">
           			<tr>
           				<td  width="20%">
           				父菜单：
           				</td>
           				<td  width="30%">
           				<select name="parentId">
           					<option value="0">无</option>
           					<#list parentMeunList as menu>
           						<option value="${menu.id}" <#if menu.id=modifyMenu.parentId>selected="true"</#if>>${menu.menuName}</option>
           					</#list>
           				</select>
           				</td>
           				
           				<td width="20%">
           				菜单名：
           				</td>
           				<td width="30%">
           				<input name="menuName" value="${modifyMenu.menuName}"/>
           				</td>
           				

           			</tr>
           			<tr>
           				<td>
           				菜单路径：
           				</td>
           				<td>
           				<input name="menuUrl" value="${modifyMenu.menuUrl}"/>
           				</td>
           				<td>
           				菜单权重：
           				</td>
           				<td>
           				<input name="menuOrder" value="${modifyMenu.menuOrder}"/>
           				</td>
           				

           			</tr>
           		</table>
           	</form>
         </div>
         <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal">关闭
            </button>
            <button type="button" class="btn btn-primary" onclick="saveMenuFn();">
              	 提交更改
            </button>
         </div>
      </div>
</div>